package com.dubbo.rpc.discovery.strategy;

import com.dubbo.rpc.common.LoadBalanceStrategyEnum;
import com.dubbo.rpc.domain.ProviderInfo;
import com.dubbo.rpc.domain.ServiceDiscoveryInfo;

/**
 * 负载均衡父类
 */
public interface AbstractLoadBalanceStrategy {

    /**
     * 策略名称
     * @return
     */
    LoadBalanceStrategyEnum strategy();

    /**
     * 策略实现
     * @param serviceDiscoveryInfo
     * @return
     */
    ProviderInfo select(ServiceDiscoveryInfo serviceDiscoveryInfo);

}
